<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Agile Modbus: Modbus Constants</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Agile Modbus
   &#160;<span id="projectnumber">1.1.4</span>
   </div>
   <div id="projectbrief">Lightweight modbus protocol stack.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('group___modbus___constants.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a>  </div>
  <div class="headertitle">
<div class="title">Modbus Constants<div class="ingroups"><a class="el" href="group___c_o_m_m_o_n.html">Common</a> &raquo; <a class="el" href="group___c_o_m_m_o_n___exported___constants.html">Common Exported Constants</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Collaboration diagram for Modbus Constants:</div>
<div class="dyncontent">
<div class="center"><img src="group___modbus___constants.png" border="0" usemap="#agroup______modbus______constants" alt=""/></div>
<map name="agroup______modbus______constants" id="agroup______modbus______constants">
<area shape="rect" href="group___c_o_m_m_o_n___exported___constants.html" title=" " alt="" coords="5,5,217,31"/>
<area shape="rect" title=" " alt="" coords="265,5,408,31"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga6465ef54c2c342da4d0bab3960ed102f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___modbus___constants.html#ga6465ef54c2c342da4d0bab3960ed102f">AGILE_MODBUS_VERSION_STRING</a>&#160;&#160;&#160;&quot;AMB_1.1.4&quot;</td></tr>
<tr class="memdesc:ga6465ef54c2c342da4d0bab3960ed102f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Agile Modbus version number.  <a href="group___modbus___constants.html#ga6465ef54c2c342da4d0bab3960ed102f">More...</a><br /></td></tr>
<tr class="separator:ga6465ef54c2c342da4d0bab3960ed102f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga224b2d0e89248e2928b13486362e1dc2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___modbus___constants.html#ga224b2d0e89248e2928b13486362e1dc2">AGILE_MODBUS_BROADCAST_ADDRESS</a>&#160;&#160;&#160;0</td></tr>
<tr class="memdesc:ga224b2d0e89248e2928b13486362e1dc2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modbus broadcast address.  <a href="group___modbus___constants.html#ga224b2d0e89248e2928b13486362e1dc2">More...</a><br /></td></tr>
<tr class="separator:ga224b2d0e89248e2928b13486362e1dc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad48bc178785378db70099637fc648d77"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___modbus___constants.html#gad48bc178785378db70099637fc648d77">AGILE_MODBUS_MAX_PDU_LENGTH</a>&#160;&#160;&#160;253</td></tr>
<tr class="separator:gad48bc178785378db70099637fc648d77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac4b27ed9fcc35c7aa76e2a6c21bbf2b6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___modbus___constants.html#gac4b27ed9fcc35c7aa76e2a6c21bbf2b6">AGILE_MODBUS_MAX_ADU_LENGTH</a>&#160;&#160;&#160;260</td></tr>
<tr class="separator:gac4b27ed9fcc35c7aa76e2a6c21bbf2b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader">Quantity limit of Coils</h2></td></tr>
<tr><td class="ititle" colspan="2"><p><a class="anchor" id="amgrp4c5b783cf17e71d2d276df67dc1964c5"></a></p><pre class="fragment">   Modbus_Application_Protocol_V1_1b.pdf (chapter 6 section 1 page 12)
   Quantity of Coils to read (2 bytes): 1 to 2000 (0x7D0)
   (chapter 6 section 11 page 29)
   Quantity of Coils to write (2 bytes): 1 to 1968 (0x7B0)</pre> </td></tr>
<tr class="memitem:ga55e6b64f5c26356198708ce0ee23bb60"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___modbus___constants.html#ga55e6b64f5c26356198708ce0ee23bb60">AGILE_MODBUS_MAX_READ_BITS</a>&#160;&#160;&#160;2000</td></tr>
<tr class="separator:ga55e6b64f5c26356198708ce0ee23bb60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabc9412592af5b13346eda171ba6e4f3c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___modbus___constants.html#gabc9412592af5b13346eda171ba6e4f3c">AGILE_MODBUS_MAX_WRITE_BITS</a>&#160;&#160;&#160;1968</td></tr>
<tr class="separator:gabc9412592af5b13346eda171ba6e4f3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader">Quantity limit of Registers</h2></td></tr>
<tr><td class="ititle" colspan="2"><p><a class="anchor" id="amgrpac96ae54eafa916ed023a78ac68c1f1a"></a></p><pre class="fragment">   Modbus_Application_Protocol_V1_1b.pdf (chapter 6 section 3 page 15)
   Quantity of Registers to read (2 bytes): 1 to 125 (0x7D)
   (chapter 6 section 12 page 31)
   Quantity of Registers to write (2 bytes) 1 to 123 (0x7B)
   (chapter 6 section 17 page 38)
   Quantity of Registers to write in R/W registers (2 bytes) 1 to 121 (0x79)</pre> </td></tr>
<tr class="memitem:gae197ea0d248e33a49957dd33580eda1c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___modbus___constants.html#gae197ea0d248e33a49957dd33580eda1c">AGILE_MODBUS_MAX_READ_REGISTERS</a>&#160;&#160;&#160;125</td></tr>
<tr class="separator:gae197ea0d248e33a49957dd33580eda1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa82d47d969c352ebb7d9f005d2616434"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___modbus___constants.html#gaa82d47d969c352ebb7d9f005d2616434">AGILE_MODBUS_MAX_WRITE_REGISTERS</a>&#160;&#160;&#160;123</td></tr>
<tr class="separator:gaa82d47d969c352ebb7d9f005d2616434"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad0d6ebec0edd26f1eb80db66840f26d0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___modbus___constants.html#gad0d6ebec0edd26f1eb80db66840f26d0">AGILE_MODBUS_MAX_WR_WRITE_REGISTERS</a>&#160;&#160;&#160;121</td></tr>
<tr class="separator:gad0d6ebec0edd26f1eb80db66840f26d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf4784aefd5c87a17940705d22ffdf457"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___modbus___constants.html#gaf4784aefd5c87a17940705d22ffdf457">AGILE_MODBUS_MAX_WR_READ_REGISTERS</a>&#160;&#160;&#160;125</td></tr>
<tr class="separator:gaf4784aefd5c87a17940705d22ffdf457"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga6465ef54c2c342da4d0bab3960ed102f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6465ef54c2c342da4d0bab3960ed102f">&#9670;&nbsp;</a></span>AGILE_MODBUS_VERSION_STRING</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGILE_MODBUS_VERSION_STRING&#160;&#160;&#160;&quot;AMB_1.1.4&quot;</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Agile Modbus version number. </p>

<p class="definition">Definition at line <a class="el" href="agile__modbus_8h_source.html#l00067">67</a> of file <a class="el" href="agile__modbus_8h_source.html">agile_modbus.h</a>.</p>

</div>
</div>
<a id="ga224b2d0e89248e2928b13486362e1dc2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga224b2d0e89248e2928b13486362e1dc2">&#9670;&nbsp;</a></span>AGILE_MODBUS_BROADCAST_ADDRESS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGILE_MODBUS_BROADCAST_ADDRESS&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Modbus broadcast address. </p>

<p class="definition">Definition at line <a class="el" href="agile__modbus_8h_source.html#l00069">69</a> of file <a class="el" href="agile__modbus_8h_source.html">agile_modbus.h</a>.</p>

</div>
</div>
<a id="ga55e6b64f5c26356198708ce0ee23bb60"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga55e6b64f5c26356198708ce0ee23bb60">&#9670;&nbsp;</a></span>AGILE_MODBUS_MAX_READ_BITS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGILE_MODBUS_MAX_READ_BITS&#160;&#160;&#160;2000</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="agile__modbus_8h_source.html#l00081">81</a> of file <a class="el" href="agile__modbus_8h_source.html">agile_modbus.h</a>.</p>

</div>
</div>
<a id="gabc9412592af5b13346eda171ba6e4f3c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabc9412592af5b13346eda171ba6e4f3c">&#9670;&nbsp;</a></span>AGILE_MODBUS_MAX_WRITE_BITS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGILE_MODBUS_MAX_WRITE_BITS&#160;&#160;&#160;1968</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="agile__modbus_8h_source.html#l00082">82</a> of file <a class="el" href="agile__modbus_8h_source.html">agile_modbus.h</a>.</p>

</div>
</div>
<a id="gae197ea0d248e33a49957dd33580eda1c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae197ea0d248e33a49957dd33580eda1c">&#9670;&nbsp;</a></span>AGILE_MODBUS_MAX_READ_REGISTERS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGILE_MODBUS_MAX_READ_REGISTERS&#160;&#160;&#160;125</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="agile__modbus_8h_source.html#l00099">99</a> of file <a class="el" href="agile__modbus_8h_source.html">agile_modbus.h</a>.</p>

</div>
</div>
<a id="gaa82d47d969c352ebb7d9f005d2616434"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa82d47d969c352ebb7d9f005d2616434">&#9670;&nbsp;</a></span>AGILE_MODBUS_MAX_WRITE_REGISTERS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGILE_MODBUS_MAX_WRITE_REGISTERS&#160;&#160;&#160;123</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="agile__modbus_8h_source.html#l00100">100</a> of file <a class="el" href="agile__modbus_8h_source.html">agile_modbus.h</a>.</p>

</div>
</div>
<a id="gad0d6ebec0edd26f1eb80db66840f26d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad0d6ebec0edd26f1eb80db66840f26d0">&#9670;&nbsp;</a></span>AGILE_MODBUS_MAX_WR_WRITE_REGISTERS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGILE_MODBUS_MAX_WR_WRITE_REGISTERS&#160;&#160;&#160;121</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="agile__modbus_8h_source.html#l00101">101</a> of file <a class="el" href="agile__modbus_8h_source.html">agile_modbus.h</a>.</p>

</div>
</div>
<a id="gaf4784aefd5c87a17940705d22ffdf457"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf4784aefd5c87a17940705d22ffdf457">&#9670;&nbsp;</a></span>AGILE_MODBUS_MAX_WR_READ_REGISTERS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGILE_MODBUS_MAX_WR_READ_REGISTERS&#160;&#160;&#160;125</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="agile__modbus_8h_source.html#l00102">102</a> of file <a class="el" href="agile__modbus_8h_source.html">agile_modbus.h</a>.</p>

</div>
</div>
<a id="gad48bc178785378db70099637fc648d77"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad48bc178785378db70099637fc648d77">&#9670;&nbsp;</a></span>AGILE_MODBUS_MAX_PDU_LENGTH</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGILE_MODBUS_MAX_PDU_LENGTH&#160;&#160;&#160;253</td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">   The size of the MODBUS PDU is limited by the size constraint inherited from
   the first MODBUS implementation on Serial Line network (max. RS485 ADU = 256
   bytes). Therefore, MODBUS PDU for serial line communication = 256 - Server
   address (1 byte) - CRC (2 bytes) = 253 bytes.</pre> 
<p class="definition">Definition at line <a class="el" href="agile__modbus_8h_source.html#l00116">116</a> of file <a class="el" href="agile__modbus_8h_source.html">agile_modbus.h</a>.</p>

</div>
</div>
<a id="gac4b27ed9fcc35c7aa76e2a6c21bbf2b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac4b27ed9fcc35c7aa76e2a6c21bbf2b6">&#9670;&nbsp;</a></span>AGILE_MODBUS_MAX_ADU_LENGTH</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AGILE_MODBUS_MAX_ADU_LENGTH&#160;&#160;&#160;260</td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">   Consequently:
   - RTU MODBUS ADU = 253 bytes + Server address (1 byte) + CRC (2 bytes) = 256
   bytes.
   - TCP MODBUS ADU = 253 bytes + MBAP (7 bytes) = 260 bytes.
   so the maximum of both backend in 260 bytes. This size can used to allocate
   an array of bytes to store responses and it will be compatible with the two
   backends.</pre> 
<p class="definition">Definition at line <a class="el" href="agile__modbus_8h_source.html#l00130">130</a> of file <a class="el" href="agile__modbus_8h_source.html">agile_modbus.h</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
